package MyTestGroupId.SpringPetty;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import beans.Juggler;
import beans.MessagePrinter;
import beans.Performer;



/**
 * Hello world!
 *
 */

@Configuration
public class App 
{
	@Bean
	public Performer mockPerformer() {
		return new Juggler(10);
	}
	
    public static void main( String[] args )
    {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("application.xml") ; 
    	// ApplicationContext ctx = new AnnotationConfigApplicationContext(App.class);
        MessagePrinter mp = (MessagePrinter)ctx.getBean("messagePrinter");
        mp.print(); 
    }
}
